/*
 * TCPServerPacketReaderWriter.h
 *
 *  Created on: Sep 17, 2017
 *      Author: zjf
 */

#ifndef SRC_TCPSERVERPACKETREADERWRITER_H_
#define SRC_TCPSERVERPACKETREADERWRITER_H_

#include <Poco/Net/StreamSocket.h>

using namespace Poco::Net;

#include "PacketReaderWriter.h"

using namespace utils;

namespace network
{

class TCPServerPacketReaderWriter: public PacketReaderWriter
{
public:
	TCPServerPacketReaderWriter(StreamSocket& socket);
	virtual ~TCPServerPacketReaderWriter();

	virtual int read(char *pBuff, const Int32 len);
	virtual int write(const char *pBuff, const Int32 len);

private:
	StreamSocket& _socket;
};

} /* namespace network */

#endif /* SRC_TCPSERVERPACKETREADERWRITER_H_ */
